<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
    {% block title %}<title>Local Library</title>{% endblock %}
    {% load static %}
    <link rel="stylesheet" href="{% static 'css/styles.css' %}">

</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-2">
            {% block sidebar %}<!-- insert default navigation text for every page -->
                <ul class="sidebar-nav">
                    <li><a href="{% url 'index' %}">Home</a></li>
                    <li><a href="{% url 'book-list' %}">All books</a></li>
                    <li><a href="{% url 'authors' %}">All authors</a></li>
                    {% if user.is_authenticated %}
                        <li>User: {{ user.get_username }}</li>
                        <li><a href="{% url 'logout' %}?next={{ request.path }}">Logout</a></li>
                          <li><a href="{% url 'my-borrowed' %}">My Borrowed</a></li>
                    {% else %}
                        <li><a href="{% url 'login' %}?next={{ request.path }}">Login</a></li>
                    {% endif %}
                </ul>
            {% endblock %}
        </div>
        <div class="col-sm-10">
            {% block content %}<!-- default content text (typically empty) -->
            {% endblock %}
        </div>
    </div>
</div>

<!-- Optional JavaScript; choose one of the two! -->

<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
        crossorigin="anonymous"></script>

<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js" integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js" integrity="sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj" crossorigin="anonymous"></script>
-->
</body>
</html>